 <template>
	<view >
		<!-- 自定义导航位置 -->
		<!-- 页面需要的自定义导航 -->
		<!-- 页面 -->
		<tab1 v-if="index === 0"/>
		<tab2 v-if="index === 1"/>
		<tab3 v-if="index === 2"/>
		<tab4 v-if="index === 3"/>
		<mine v-if="index === 4"/>
		<!-- 底部导航 -->
		<foo-bar @toIndex="toIndex"></foo-bar>
	</view>
</template>

<script>
	import tab1 from  '../tab1/tab1'
	import tab2 from  '../tab2/tab2'
	import tab3 from  '../tab3/tab3'
	import tab4 from  '../tab4/tab4'
	import mine from  '../mine'
	import fooBar from  '@/components/fooBar/fooBar'
	export default {
		components:{
			tab1,
			tab2,
			tab3,
			tab4,
			mine,
			fooBar
		},
		data() {
			return {
				index: 0,
				title: '首页',
				skeletonOff: false,
			}
		},
		methods: {
			toIndex(index){
				// index 当前页面的索引
				this.index = index
				
			},

		}
	}
</script>

<style  lang="scss">
	
</style>